package Shopcar;

public class Commodity {
    private  String name;
    private  double price;
    private  String aboutCommodity;
    private  int sum;
    public Commodity(){

    }

    public Commodity(String name, double price, String aboutCommodity, int sum) {
        this.name = name;
        this.price = price;
        this.aboutCommodity = aboutCommodity;
        this.sum = sum;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public String getAboutCommodity() {
        return aboutCommodity;
    }

    public void setAboutCommodity(String aboutCommodity) {
        this.aboutCommodity = aboutCommodity;
    }

    public int getSum() {
        return sum;
    }

    public void setSum(int sum) {
        this.sum = sum;
    }
    public void String(){
        System.out.println("商品名："+getName()+
                "\t 商品价格："+getPrice()+"\n 商品描述："+getAboutCommodity()+"\n 商品数量："+getSum());
    }
}
